package com.zzh.lib.bar.rom

import android.content.Context
import android.os.Build
import androidx.annotation.RequiresApi
import com.zzh.lib.bar.extension.commonNavigationBarExist
import com.zzh.lib.core.utils.HResUtils

abstract class BaseRom : Rom {

    override fun navigationBarExist(context: Context): Boolean {
        if (fullScreenGestureOn(context)) {
            return screenIndicatorOn(context)
        }
        return context.commonNavigationBarExist()
    }

    /**
     * 是否开启了全面屏手势
     */
    protected abstract fun fullScreenGestureOn(context: Context): Boolean

    /**
     * 是否开启了手势提示线
     */
    protected open fun screenIndicatorOn(context: Context): Boolean = false

}